<html>
<head>
	<meta charset="UTF-8">
	<title>服务基本信息</title>
	<link id="easyuiTheme"  href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
	<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
	<link href="../../static/css/esaas-easyui-edit.css" rel="stylesheet" type="text/css"/>
	<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
	<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
	<script src="../../ffres/dict/all.js" type="text/javascript"></script>
	<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<body class="easyui-layout" scroll="no">
<div data-options="region:'north',title:''" style="height:50%;">
	<form id="ff" method="post" >
		<div class="esaas-info-title" style="background:#205081;color:white;width:100%;margin:0;padding:5px;">服务基本信息</div>
		<table class="esaas-info-view-table">
			<tr>
				<td width="25%" align="right">应用唯一标识：</td>
				<td width="75%"><input class="easyui-textbox" type="text" readonly
									   id="appId" name="appId" data-options="required:true"
									   style="width: 85%; height: 25px;">
				</input></td>
			</tr>
			<tr>
				<td width="25%" align="right">服务分类：</td>
				<td width="75%"><select class="easyui-combobox"
										id="appModelCatalog" name="appModelCatalog" readonly
										style="width: 100%; height: 25px;"
										data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:APP_MODEL_CATALOG">
				</select></td>
			</tr>
			<tr>
				<td width="25%" align="right">服务类型：</td>
				<td width="75%"><select class="easyui-combobox"
										id="appModelType" name="appModelType" readonly
										style="width: 85%; height: 25px;"
										data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:APP_MODEL_TYPE">
				</select></td>
			</tr>
			<tr>
				<td width="25%" align="right">目录包标识：</td>
				<td width="75%"><input class="easyui-textbox" type="text"
									   id="packageId" name="packageId" data-options="required:false"
									   style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="25%" align="right">服务名：</td>
				<td width="75%"><input class="easyui-textbox" type="text"
									   name="appModelCode" data-options="required:true"
									   style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="25%" align="right">服务描述：</td>
				<td width="75%"><input class="easyui-textbox" type="text"
									   name="appModelName" data-options="required:true"
									   style="width: 100%; height: 25px;"></input></td>
			</tr>
		</table>
		<div style="text-align: center; padding: 15px">
		 <a href="javascript:void(0)" class="easyui-linkbutton"
				onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
		</div>
	</form>
</div>
<div data-options="region:'south',title:''" style="height:50%;">
	<div id="tabs" class="easyui-tabs" data-options="fit:true" style="width: 100%;" id="top">
		<div title="输入参数">
			<form id="ff-input" method="post" style="min-height: 310px;height:10%;width:100%;">
					<div id="inputTitle" class="esaas-info-title" style="background:#205081;color:white;width:100%;margin:0;padding:5px;">参数信息</div>
					<table class="esaas-info-view-table" id="dg1">
							<tr>
								<td width="15%" align="right" hidden="true">记录唯一编号：</td>
								<td width="35%" hidden="true"><input class="easyui-textbox" type="text"
																	 name="recordKeyid" data-options="required:false"
																	 style="width: 100%; height: 25px;"></input></td>
								<td width="15%" align="right">开发模型标识：</td>
								<td width="35%"><input class="easyui-textbox" type="text"
													   name="appModelId" data-options="required:false"
													   id="app_model_id_tab1"
													   style="width: 100%; height: 25px;"></input></td>
							</tr>
							<tr>
								<td width="15%" align="right">参数字段代码：</td>
								<td width="35%"><input class="easyui-textbox" type="text"
													   name="paramFieldCode" data-options="required:true"
													   style="width: 100%; height: 25px;"></input></td>
							</tr>
							<tr>
								<td width="15%" align="right">参数字段类型：</td>
								<td width="35%"><input class="easyui-textbox" type="text"
													   name="paramFieldType" data-options="required:false"
													   style="width: 100%; height: 25px;"></input></td>
							</tr>
							<tr>
								<td width="15%" align="right">参数字段名称：</td>
								<td width="35%"><input class="easyui-textbox" type="text"
													   name="paramFieldName" data-options="required:true"
													   style="width: 100%; height: 25px;"></input></td>
							</tr>
							<tr hidden="true">
								<td width="15%" align="right">是否必需：</td>
								<td width="35%"><input class="easyui-textbox" type="text"
													   name="mustNeed" data-options="required:false"
													   style="width: 100%; height: 25px;"></input></td>
								<td width="15%" align="right">io_type(I,输入O,输出)：</td>
								<td width="35%"><input class="easyui-textbox" type="text"
													   name="ioType"
													   id="ioType-input" name="ioType" data-options="required:false"
													   style="width: 100%; height: 25px;"></input></td>
							</tr>
						</table>
					<div style="text-align: center; padding: 15px">
						<a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
					</div>
			</form>
		</div>
		<div title="输出参数">
			<form id="ff-out" method="post" style="min-height: 310px;height:10%;width:100%;">
				<div id="outTitle" class="esaas-info-title" style="background:#205081;color:white;width:100%;margin:0;padding:5px;">参数信息</div>
				<table class="esaas-info-view-table" id="dg2">
					<tr>
						<td width="15%" align="right" hidden="true">记录唯一编号：</td>
						<td width="35%" hidden="true"><input class="easyui-textbox" type="text"
															 name="recordKeyid" data-options="required:false"
															 style="width: 100%; height: 25px;"></input></td>
						<td width="15%" align="right">开发模型标识：</td>
						<td width="35%"><input class="easyui-textbox" type="text"
											   name="appModelId" data-options="required:false"
											   id="app_model_id_tab2"
											   style="width: 100%; height: 25px;"></input></td>
					</tr>
					<tr>
						<td width="15%" align="right">参数字段代码：</td>
						<td width="35%"><input class="easyui-textbox" type="text"
											   name="paramFieldCode" data-options="required:true"
											   style="width: 100%; height: 25px;"></input></td>
					</tr>
					<tr>
						<td width="15%" align="right">参数字段类型：</td>
						<td width="35%"><input class="easyui-textbox" type="text"
											   name="paramFieldType" data-options="required:false"
											   style="width: 100%; height: 25px;"></input></td>
					</tr>
					<tr>
						<td width="15%" align="right">参数字段名称：</td>
						<td width="35%"><input class="easyui-textbox" type="text"
											   name="paramFieldName" data-options="required:true"
											   style="width: 100%; height: 25px;"></input></td>
					</tr>
					<tr hidden="true">
						<td width="15%" align="right">是否必需：</td>
						<td width="35%"><input class="easyui-textbox" type="text"
											   name="mustNeed" data-options="required:false"
											   style="width: 100%; height: 25px;"></input></td>
						<td width="15%" align="right">io_type(I,输入O,输出)：</td>
						<td width="35%"><input class="easyui-textbox" type="text"
											   name="ioType"
											   id="ioType-out" name="ioType" data-options="required:false"
											   style="width: 100%; height: 25px;"></input></td>
					</tr>
				</table>
				<div style="text-align: center; padding: 15px">
					<a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
				</div>
			</form>
		</div>
	</div>
</div>

<script>
	$(function() {
		addTitle("查看")
		var appModelId = $.getUrlParam('appModelId');
		$.restfulGet('../../api/app/model/info/' + appModelId ,null,function(data){
			$('#ff').form('load', {
				appId : data.rows.appId,
				appModelId : data.rows.appModelId,
				appModelCode : data.rows.appModelCode,
				appModelName : data.rows.appModelName,
				appModelCatalog : data.rows.appModelCatalog,
				appModelType : data.rows.appModelType,
				packageId : data.rows.packageId,
				tableModelId : data.rows.tableModelId,
				tableModelCode : data.rows.tableModelCode,
				tableModelName : data.rows.tableModelName,
				createUser : data.rows.createUser,
				createTime : data.rows.createTime,
				lastUpdateUser : data.rows.lastUpdateUser,
				lastUpdateTime : data.rows.lastUpdateTime
			});
		});
		$.restfulPostForm('../../api/isrv/inout/infos/' , {appModelId : appModelId,ioType:"I"},function(data){
			if(data.rows.length==1) {
				$('#ff-input').form('load', {
					recordKeyid: data.rows[0].recordKeyid,
					appModelId: data.rows[0].appModelId,
					paramFieldCode: data.rows[0].paramFieldCode,
					paramFieldType: data.rows[0].paramFieldType,
					paramFieldName: data.rows[0].paramFieldName,
					mustNeed: data.rows[0].mustNeed,
					ioType: data.rows[0].ioType
				});
			}
		});
		$.restfulPostForm('../../api/isrv/inout/infos/' , {appModelId : appModelId,ioType:"O"},function(data){
			if(data.rows.length==1) {
				$('#ff-out').form('load', {
					recordKeyid: data.rows[0].recordKeyid,
					appModelId: data.rows[0].appModelId,
					paramFieldCode: data.rows[0].paramFieldCode,
					paramFieldType: data.rows[0].paramFieldType,
					paramFieldName: data.rows[0].paramFieldName,
					mustNeed: data.rows[0].mustNeed,
					ioType: data.rows[0].ioType
				});
			}
		});

	});
	function closeForm(){
		window.parent.JLEUtil.closewin();
	}
	</script>
</body>
</html>
